import { lazy } from 'react'
/* import ArtList from '../pages/ArtList/index.js'
import ArtEdit from '../pages/ArtEdit/index.js'
import ArtAdd from '../pages/ArtAdd/index.js'
import DashBoard from '../pages/DashBoard/index.js'
import MsgList from '../pages/MsgList/index.js'
import Setting from '../pages/Setting/index.js'
import NoPermission from '../pages/NoPermission/index.js' */
import {
 UnorderedListOutlined,
 LineChartOutlined,
 MessageOutlined,
 SettingOutlined
} from '@ant-design/icons'
const ArtList = lazy(()=> import('../pages/ArtList/index.js'))
const ArtEdit = lazy(()=> import('../pages/ArtEdit/index.js'))
const ArtAdd = lazy(()=> import('../pages/ArtAdd/index.js'))
const DashBoard = lazy(()=> import('../pages/DashBoard/index.js'))
const MsgList = lazy(()=> import('../pages/MsgList/index.js'))
const Setting = lazy(()=> import('../pages/Setting/index.js'))
const NoPermission = lazy(()=> import('../pages/NoPermission/index.js'))

// 路由配置
const adminRoutes = [
  {
    path:"/admin/dashBoard",
    name:"仪表盘",
    icon: LineChartOutlined,
    meta:{
      isNav: true,
      roles: ['superAdmin','admin','a']
    },
    component:DashBoard
  },
  {
    path:"/admin/artList",
    name:"文章列表",
    icon:UnorderedListOutlined,
    meta:{
      isNav: true,
      roles: ['superAdmin','admin','a']
    },
    component:ArtList
  },
  {
    path:"/admin/artAdd",
    name:"添加文章",
    meta:{
      isNav: false,
      roles: ['superAdmin','admin','a']
    },
    component:ArtAdd
  },
  {
    path:"/admin/artEdit/:artId",
    name:"编辑文章",
    meta:{
      isNav: false,
      roles: ['superAdmin','admin','a']
    },
    component:ArtEdit
  },
  {
    path:"/admin/msgList",
    name:"消息中心",
    icon:MessageOutlined,
    meta:{
      isNav: true,
      roles: ['superAdmin','admin','a']
    },
    component:MsgList
  },
  {
    path:"/admin/nopermission",
    name:"没有权限",
    meta:{
      isNav: false,
      roles: ['superAdmin','admin','a']
    },
    component:NoPermission
  },
  {
    path:"/admin/setting",
    name:"设置",
    icon:SettingOutlined,
    meta:{
      isNav: true,
      roles: ['superAdmin','a']
    },
    component:Setting
  }
]


export default adminRoutes